package com.longsichao.lscframe.view;

import android.content.Context;
import android.support.annotation.StringRes;
import android.widget.Toast;

import com.longsichao.lscframe.tools.LSCLog;

/**
 * @author SONG GUANYULONGSICHAO (leo.song[at]outlook[dot]com)
 * @version 1
 */
public final class LSCToast {

    /**
     * Make a standard toast that just contains a text view with the text from a resource.
     *
     * @param context The context to use. Usually your {@link android.app.Application} or {@link android.app.Activity} object.
     * @param resId   The resource id of the string resource to use.
     */
    public static void show(Context context, @StringRes int resId) {
        show(context, context.getString(resId));
    }

    /**
     * Make a standard toast that just contains a text view.
     *
     * @param context The context to use. Usually your {@link android.app.Application} or {@link android.app.Activity} object.
     * @param text    The text to show.
     */
    public static void show(Context context, CharSequence text) {
        Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
        LSCLog.v("TOAST : " + text);
    }

    private LSCToast() {
    }
}
